<!DOCTYPE html>
<html lang="en-US">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>create_ncc_model [HALCON算子参考手册]</title>
<style type="text/css">
      body {
    color: #000000;
    background-color: #ffffff;
    margin: 0;
    font-family: Arial, Helvetica, sans-serif;
}

.body_main {
    margin-left: 35px;
    margin-right: 35px;
}

@media screen and (min-width:992px) {

    .body_main {
        margin-left: 10%;
        margin-right: 10%;
    }

    table.toctable {
        width: 80%
    }
}

@media screen and (min-width:1400px) {

    .body_main {
        margin-left: 15%;
        margin-right: 15%;
    }

    table.toctable {
        width: 70%
    }
}

body>div ul ul {
    margin-left: inherit;
}

a:link {
    color: #0044cc;
}

a:link,
a:visited {
    text-decoration: none;
}

a:link:hover,
a:visited:hover {
    text-decoration: underline;
}

th {
    text-align: left;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    text-rendering: optimizeLegibility;
    color: #666666;
}

code {
    font-family: monospace,monospace;
}

h1 a.halconoperator {
    font-family: Arial, Helvetica, sans-serif;
    color: #666666;
}

h2 a.halconoperator {
    font-family: Arial, Helvetica, sans-serif;
    color: #666666;
}

hr {
    border: 0;
    border-top: solid 1px #f28d26;
}

.pre {
    display: block;
    padding-bottom: 1ex;
    font-family: monospace;
    white-space: pre;
}

pre {
    font-family: monospace, monospace;
    padding: 1ex;
    white-space: pre-wrap;
}

.toc {
    font-size: 80%;
    border-top: 1px dashed #f28d26;
    border-bottom: 1px dashed #f28d26;
    padding-top: 5px;
    padding-bottom: 5px;
}

.inv {
    margin: 0;
    border: 0;
    padding: 0;
}

.banner {
    color: #666666;
    padding-left: 1em;
}

.logo {
    background-color: white;
}

.keyboard {
    font-size: 80%;
    padding-left: 3px;
    padding-right: 3px;
    border-radius: 5px;
    border-width: 1px;
    border-style: solid;
    border-color: #f28d26;
    background-color: #f3f3f3;
}

.warning {
    margin-top: 2ex;
    margin-bottom: 1ex;
    padding: 10px;
    text-align: center;
    border: 1px solid;
    color: #bb0000;
    background-color: #fff7f7
}

.imprint {
    margin-top: 1ex;
    font-size: 80%;
    color: #666666;
}

.imprinthead {
    font-weight: bolder;
    color: #666666;
}

.indexlink {
    text-align: right;
    padding-bottom: 5px;
}

.postscript {
    margin-top: 2ex;
    font-size: 80%;
    color: #666666
}

.evenrow {
    background-color: #e7e7ef;
    vertical-align: top;
}

.oddrow {
    background-color: #f7f7ff;
    vertical-align: top;
}

.headrow {
    background-color: #97979f;
    color: #ffffff;
    vertical-align: top;
}

.logorow {
    vertical-align: top;
}

.error {
    color: red;
}

.var {
    font-style: italic
}

.halconoperator {
    font-family: monospace, monospace;
}

span.operator {
    font-family: monospace, monospace;
}

span.procedure {
    font-family: monospace, monospace;
}

span.operation {
    font-family: monospace, monospace;
}

span.feature {
    font-family: Arial, Helvetica, Homerton, sans-serif;
}

ul {
    padding-left: 1.2em;
}

li.dot {
    list-style-type: square;
    color: #f28d26;
}

.breadcrumb {
    font-size: 80%;
    color: white;
    background-color: #062d64;
    margin-bottom: 20px;
    padding-left: 35px;
    padding-right: 35px;
    padding-bottom: 15px;
}

.webbar {
    font-size: 80%;
    background-color: #dddddd;
    margin-top: 0px;
    margin-left: -35px;
    margin-right: -35px;
    margin-bottom: 0px;
    padding-top: 5px;
    padding-left: 35px;
    padding-right: 35px;
    padding-bottom: 5px;
}

.footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    border-top: 1px dashed #f28d26;
    font-size: 80%;
    color: #666666;
    padding-bottom: 8px;
}

.footer .socialmedia a {
    padding-left: 7px;
}

.socialmedia {
    padding-top: 10px;
}

.copyright {
    margin-top: 19px;
}

.breadcrumb a {
    color: #ffffff;
    border-bottom: 1px solid white;
}

.breadcrumb a:link:hover,
.breadcrumb a:visited:hover {
    text-decoration: none;
    border-bottom: none;
}

.heading {
    margin-top: 1ex;
    font-size: 110%;
    font-weight: bold;
    color: #666666;
}

.text {
    color: black;
}

.example {
    font-size: 80%;
    background-color: #f3f3f3;
    border: 1px dashed #666666;
    padding: 10px;
}

.displaymath {
    display: block;
    text-align: center;
    margin-top: 1ex;
    margin-bottom: 1ex;
}

.title {
    float: left;
    padding-top: 3px;
    padding-bottom: 3px;
}

.signnote {
    font-family: Arial, Helvetica, Homerton, sans-serif;
    font-size: 80%;
    color: #666666;
    font-weight: lighter;
    font-style: italic
}

.par {
    margin-bottom: 1.5em;
}

.parhead {
    text-align: right;
}

.parname {
    float: left;
}

.pardesc {
    font-size: 85%;
    margin-top: 0.5em;
    margin-bottom: 0.5em;
    margin-left: 2em;
}

.parcat {
    color: #666;
    font-weight: bold;
}

*[data-if=cpp],
*[data-if=c],
*[data-if=dotnet],
*[data-if=com],
*[data-if=python] {
    display: none;
}

.tabbar {
    text-align: right;
    border-bottom: 1px solid #f28d26;
    margin-bottom: 0.5em;
}

ul.tabs {
    padding-top: 3px;
    padding-bottom: 3px;
    margin-top: 10px;
    margin-bottom: 0;
    font-size: 80%
}

ul.tabs li {
    padding-top: 3px;
    padding-bottom: 3px;
    display: inline;
    overflow: hidden;
    list-style-type: none;
    margin: 0;
    margin-left: 8px;
    border-top: 1px solid #666;
    border-left: 1px solid #666;
    border-right: 1px solid #666;
}

ul.tabs li.active {
    border-left: 1px solid #f28d26;
    border-right: 1px solid #f28d26;
    border-top: 1px solid #f28d26;
    border-bottom: 1px solid #fff;
}

ul.tabs li.inactive {
    background-color: #eee;
}

ul.tabs li a {
    padding-left: 5px;
    padding-right: 5px;
    color: #666;
}

ul.tabs li a:link:hover {
    text-decoration: none;
}

ul.tabs li.inactive a {
    color: #666;
}

ul.tabs li.active a {
    color: black;
}

dl.generic dd {
    margin-bottom: 1em;
}

.pari {
    color: olive;
}

.paro {
    color: maroon;
}

.comment {
    font-size: 80%;
    color: green;
    white-space: nowrap;
}

table.grid {
    border-collapse: collapse;
}

table.grid td {
    padding: 5px;
    border: 1px solid;
}

table.layout {
    border: 0px;
}

table.layout td {
    padding: 5px;
}

table.table {
    border-collapse: collapse;
}

table.table td {
    padding: 5px;
    border-left: 0px;
    border-right: 0px;
}

table.table tr:last-child {
    border-bottom: 1px solid;
}

table.table th {
    padding: 5px;
    border-top: 1px solid;
    border-bottom: 1px solid;
    border-left: 0px;
    border-right: 0px;
}

.details_summary {
    cursor: pointer;
}

table.toctable {
    width: 100%;
}

table.toctable col:first-child {
    width: 20%;
}

table.toctable col:nth-last-child(2) {
    width: 8%;
}

table.altcolored tr:nth-child(even) {
    background-color: #f3f3f3;
}

    </style>
<!--OP_REF_STYLE_END-->
<script>
    <!--
var active_lang='hdevelop';function switchVisibility(obj,active_lang,new_lang)
{var display_style='inline';
for(var i=0;i<obj.length;i++)
{if(obj.item(i).getAttribute('data-if')==new_lang)
{obj.item(i).style.display=display_style;}
if(obj.item(i).getAttribute('data-if')==active_lang)
{obj.item(i).style.display='none';}}
return;}
function toggleLanguage(new_lang,initial)
{if(active_lang!=new_lang)
{var lis=document.getElementsByTagName('li');for(var i=0;i<lis.length;i++)
{if(lis.item(i).id=='syn-'+new_lang)
{lis.item(i).className='active';}
else
{lis.item(i).className='inactive';}}
var divs=document.getElementsByTagName('div');var spans=document.getElementsByTagName('span');switchVisibility(divs,active_lang,new_lang);switchVisibility(spans,active_lang,new_lang);if(!initial)
{setCookie("halcon_reference_language",new_lang,null,null);}
active_lang=new_lang;}
return;}
function setCookie(name,value,domain,exp_offset,path,secure)
{localStorage.setItem(name,value);}
function getCookie(name)
{return localStorage.getItem(name);}
function initialize()
{var qs=location.href.split('?')[1];var qs_lang_raw=location.href.split('interface=')[1];var qs_lang;if(qs_lang_raw)
{qs_lang=qs_lang_raw.split('#')[0];}
var cookie_lang=getCookie("halcon_reference_language");var new_lang;if((qs_lang=="hdevelop")||(qs_lang=="dotnet")||(qs_lang=="python")||(qs_lang=="cpp")||(qs_lang=="c"))
{new_lang=qs_lang;setCookie("halcon_reference_language",new_lang,null,null);}
else if((cookie_lang=="hdevelop")||(cookie_lang=="dotnet")||(cookie_lang=="python")||(cookie_lang=="cpp")||(cookie_lang=="c"))
{new_lang=cookie_lang;}
else
{new_lang="hdevelop";}
toggleLanguage(new_lang,1);return;}
-->

  </script>
</head>
<body onload="initialize();">
<div class="breadcrumb">
<br class="inv"><a href="index.html">目录</a> / <a href="toc_matching.html">Matching</a> / <a href="toc_matching_correlationbased.html">Correlation-Based</a><br class="inv">
</div>
<div class="body_main">
<div class="tabbar"><ul class="tabs">
<li id="syn-hdevelop" class="active"><a href="javascript:void(0);" onclick="toggleLanguage('hdevelop')" onfocus="blur()">HDevelop</a></li>
<li id="syn-dotnet" class="inactive"><a href="javascript:void(0);" onclick="toggleLanguage('dotnet')" onfocus="blur()">.NET</a></li>
<li id="syn-python" class="inactive"><a href="javascript:void(0);" onclick="toggleLanguage('python')" onfocus="blur()">Python</a></li>
<li id="syn-cpp" class="inactive"><a href="javascript:void(0);" onclick="toggleLanguage('cpp')" onfocus="blur()">C++</a></li>
<li id="syn-c" class="inactive"><a href="javascript:void(0);" onclick="toggleLanguage('c')" onfocus="blur()">C</a></li>
</ul></div>
<div class="indexlink">
<a href="index_classes.html"><span data-if="dotnet" style="display:none;">类别</span><span data-if="cpp" style="display:none;">类别</span></a><span data-if="dotnet" style="display:none;"> | </span><span data-if="cpp" style="display:none;"> | </span><a href="index_by_name.html">算子列表</a>
</div>
<!--OP_REF_HEADER_END-->
<h1 id="sec_name">
<span data-if="hdevelop" style="display:inline;">create_ncc_model</span><span data-if="c" style="display:none;">T_create_ncc_model</span><span data-if="cpp" style="display:none;">CreateNccModel</span><span data-if="dotnet" style="display:none;">CreateNccModel</span><span data-if="python" style="display:none;">create_ncc_model</span> (算子名称)</h1>
<h2>名称</h2>
<p><code><span data-if="hdevelop" style="display:inline;">create_ncc_model</span><span data-if="c" style="display:none;">T_create_ncc_model</span><span data-if="cpp" style="display:none;">CreateNccModel</span><span data-if="dotnet" style="display:none;">CreateNccModel</span><span data-if="python" style="display:none;">create_ncc_model</span></code> — Prepare an NCC model for matching.</p>
<h2 id="sec_synopsis">参数签名</h2>
<div data-if="hdevelop" style="display:inline;">
<p>
<code><b>create_ncc_model</b>(<a href="#Template"><i>Template</i></a> :  : <a href="#NumLevels"><i>NumLevels</i></a>, <a href="#AngleStart"><i>AngleStart</i></a>, <a href="#AngleExtent"><i>AngleExtent</i></a>, <a href="#AngleStep"><i>AngleStep</i></a>, <a href="#Metric"><i>Metric</i></a> : <a href="#ModelID"><i>ModelID</i></a>)</code></p>
</div>
<div data-if="c" style="display:none;">
<p>
<code>Herror <b>T_create_ncc_model</b>(const Hobject <a href="#Template"><i>Template</i></a>, const Htuple <a href="#NumLevels"><i>NumLevels</i></a>, const Htuple <a href="#AngleStart"><i>AngleStart</i></a>, const Htuple <a href="#AngleExtent"><i>AngleExtent</i></a>, const Htuple <a href="#AngleStep"><i>AngleStep</i></a>, const Htuple <a href="#Metric"><i>Metric</i></a>, Htuple* <a href="#ModelID"><i>ModelID</i></a>)</code></p>
</div>
<div data-if="cpp" style="display:none;">
<p>
<code>void <b>CreateNccModel</b>(const HObject&amp; <a href="#Template"><i>Template</i></a>, const HTuple&amp; <a href="#NumLevels"><i>NumLevels</i></a>, const HTuple&amp; <a href="#AngleStart"><i>AngleStart</i></a>, const HTuple&amp; <a href="#AngleExtent"><i>AngleExtent</i></a>, const HTuple&amp; <a href="#AngleStep"><i>AngleStep</i></a>, const HTuple&amp; <a href="#Metric"><i>Metric</i></a>, HTuple* <a href="#ModelID"><i>ModelID</i></a>)</code></p>
<p>
<code>void <a href="HNCCModel.html">HNCCModel</a>::<b>HNCCModel</b>(const HImage&amp; <a href="#Template"><i>Template</i></a>, const HTuple&amp; <a href="#NumLevels"><i>NumLevels</i></a>, double <a href="#AngleStart"><i>AngleStart</i></a>, double <a href="#AngleExtent"><i>AngleExtent</i></a>, const HTuple&amp; <a href="#AngleStep"><i>AngleStep</i></a>, const HString&amp; <a href="#Metric"><i>Metric</i></a>)</code></p>
<p>
<code>void <a href="HNCCModel.html">HNCCModel</a>::<b>HNCCModel</b>(const HImage&amp; <a href="#Template"><i>Template</i></a>, Hlong <a href="#NumLevels"><i>NumLevels</i></a>, double <a href="#AngleStart"><i>AngleStart</i></a>, double <a href="#AngleExtent"><i>AngleExtent</i></a>, double <a href="#AngleStep"><i>AngleStep</i></a>, const HString&amp; <a href="#Metric"><i>Metric</i></a>)</code></p>
<p>
<code>void <a href="HNCCModel.html">HNCCModel</a>::<b>HNCCModel</b>(const HImage&amp; <a href="#Template"><i>Template</i></a>, Hlong <a href="#NumLevels"><i>NumLevels</i></a>, double <a href="#AngleStart"><i>AngleStart</i></a>, double <a href="#AngleExtent"><i>AngleExtent</i></a>, double <a href="#AngleStep"><i>AngleStep</i></a>, const char* <a href="#Metric"><i>Metric</i></a>)</code></p>
<p>
<code>void <a href="HNCCModel.html">HNCCModel</a>::<b>HNCCModel</b>(const HImage&amp; <a href="#Template"><i>Template</i></a>, Hlong <a href="#NumLevels"><i>NumLevels</i></a>, double <a href="#AngleStart"><i>AngleStart</i></a>, double <a href="#AngleExtent"><i>AngleExtent</i></a>, double <a href="#AngleStep"><i>AngleStep</i></a>, const wchar_t* <a href="#Metric"><i>Metric</i></a>)  <span class="signnote">
            (
            Windows only)
          </span></code></p>
<p>
<code>void <a href="HNCCModel.html">HNCCModel</a>::<b>CreateNccModel</b>(const HImage&amp; <a href="#Template"><i>Template</i></a>, const HTuple&amp; <a href="#NumLevels"><i>NumLevels</i></a>, double <a href="#AngleStart"><i>AngleStart</i></a>, double <a href="#AngleExtent"><i>AngleExtent</i></a>, const HTuple&amp; <a href="#AngleStep"><i>AngleStep</i></a>, const HString&amp; <a href="#Metric"><i>Metric</i></a>)</code></p>
<p>
<code>void <a href="HNCCModel.html">HNCCModel</a>::<b>CreateNccModel</b>(const HImage&amp; <a href="#Template"><i>Template</i></a>, Hlong <a href="#NumLevels"><i>NumLevels</i></a>, double <a href="#AngleStart"><i>AngleStart</i></a>, double <a href="#AngleExtent"><i>AngleExtent</i></a>, double <a href="#AngleStep"><i>AngleStep</i></a>, const HString&amp; <a href="#Metric"><i>Metric</i></a>)</code></p>
<p>
<code>void <a href="HNCCModel.html">HNCCModel</a>::<b>CreateNccModel</b>(const HImage&amp; <a href="#Template"><i>Template</i></a>, Hlong <a href="#NumLevels"><i>NumLevels</i></a>, double <a href="#AngleStart"><i>AngleStart</i></a>, double <a href="#AngleExtent"><i>AngleExtent</i></a>, double <a href="#AngleStep"><i>AngleStep</i></a>, const char* <a href="#Metric"><i>Metric</i></a>)</code></p>
<p>
<code>void <a href="HNCCModel.html">HNCCModel</a>::<b>CreateNccModel</b>(const HImage&amp; <a href="#Template"><i>Template</i></a>, Hlong <a href="#NumLevels"><i>NumLevels</i></a>, double <a href="#AngleStart"><i>AngleStart</i></a>, double <a href="#AngleExtent"><i>AngleExtent</i></a>, double <a href="#AngleStep"><i>AngleStep</i></a>, const wchar_t* <a href="#Metric"><i>Metric</i></a>)  <span class="signnote">
            (
            Windows only)
          </span></code></p>
<p>
<code><a href="HNCCModel.html">HNCCModel</a> <a href="HImage.html">HImage</a>::<b>CreateNccModel</b>(const HTuple&amp; <a href="#NumLevels"><i>NumLevels</i></a>, double <a href="#AngleStart"><i>AngleStart</i></a>, double <a href="#AngleExtent"><i>AngleExtent</i></a>, const HTuple&amp; <a href="#AngleStep"><i>AngleStep</i></a>, const HString&amp; <a href="#Metric"><i>Metric</i></a>) const</code></p>
<p>
<code><a href="HNCCModel.html">HNCCModel</a> <a href="HImage.html">HImage</a>::<b>CreateNccModel</b>(Hlong <a href="#NumLevels"><i>NumLevels</i></a>, double <a href="#AngleStart"><i>AngleStart</i></a>, double <a href="#AngleExtent"><i>AngleExtent</i></a>, double <a href="#AngleStep"><i>AngleStep</i></a>, const HString&amp; <a href="#Metric"><i>Metric</i></a>) const</code></p>
<p>
<code><a href="HNCCModel.html">HNCCModel</a> <a href="HImage.html">HImage</a>::<b>CreateNccModel</b>(Hlong <a href="#NumLevels"><i>NumLevels</i></a>, double <a href="#AngleStart"><i>AngleStart</i></a>, double <a href="#AngleExtent"><i>AngleExtent</i></a>, double <a href="#AngleStep"><i>AngleStep</i></a>, const char* <a href="#Metric"><i>Metric</i></a>) const</code></p>
<p>
<code><a href="HNCCModel.html">HNCCModel</a> <a href="HImage.html">HImage</a>::<b>CreateNccModel</b>(Hlong <a href="#NumLevels"><i>NumLevels</i></a>, double <a href="#AngleStart"><i>AngleStart</i></a>, double <a href="#AngleExtent"><i>AngleExtent</i></a>, double <a href="#AngleStep"><i>AngleStep</i></a>, const wchar_t* <a href="#Metric"><i>Metric</i></a>) const  <span class="signnote">
            (
            Windows only)
          </span></code></p>
</div>
<div data-if="com" style="display:none;"></div>
<div data-if="dotnet" style="display:none;">
<p>
<code>static void <a href="HOperatorSet.html">HOperatorSet</a>.<b>CreateNccModel</b>(<a href="HObject.html">HObject</a> <a href="#Template"><i>template</i></a>, <a href="HTuple.html">HTuple</a> <a href="#NumLevels"><i>numLevels</i></a>, <a href="HTuple.html">HTuple</a> <a href="#AngleStart"><i>angleStart</i></a>, <a href="HTuple.html">HTuple</a> <a href="#AngleExtent"><i>angleExtent</i></a>, <a href="HTuple.html">HTuple</a> <a href="#AngleStep"><i>angleStep</i></a>, <a href="HTuple.html">HTuple</a> <a href="#Metric"><i>metric</i></a>, out <a href="HTuple.html">HTuple</a> <a href="#ModelID"><i>modelID</i></a>)</code></p>
<p>
<code>public <a href="HNCCModel.html">HNCCModel</a>(<a href="HImage.html">HImage</a> <a href="#Template"><i>template</i></a>, <a href="HTuple.html">HTuple</a> <a href="#NumLevels"><i>numLevels</i></a>, double <a href="#AngleStart"><i>angleStart</i></a>, double <a href="#AngleExtent"><i>angleExtent</i></a>, <a href="HTuple.html">HTuple</a> <a href="#AngleStep"><i>angleStep</i></a>, string <a href="#Metric"><i>metric</i></a>)</code></p>
<p>
<code>public <a href="HNCCModel.html">HNCCModel</a>(<a href="HImage.html">HImage</a> <a href="#Template"><i>template</i></a>, int <a href="#NumLevels"><i>numLevels</i></a>, double <a href="#AngleStart"><i>angleStart</i></a>, double <a href="#AngleExtent"><i>angleExtent</i></a>, double <a href="#AngleStep"><i>angleStep</i></a>, string <a href="#Metric"><i>metric</i></a>)</code></p>
<p>
<code>void <a href="HNCCModel.html">HNCCModel</a>.<b>CreateNccModel</b>(<a href="HImage.html">HImage</a> <a href="#Template"><i>template</i></a>, <a href="HTuple.html">HTuple</a> <a href="#NumLevels"><i>numLevels</i></a>, double <a href="#AngleStart"><i>angleStart</i></a>, double <a href="#AngleExtent"><i>angleExtent</i></a>, <a href="HTuple.html">HTuple</a> <a href="#AngleStep"><i>angleStep</i></a>, string <a href="#Metric"><i>metric</i></a>)</code></p>
<p>
<code>void <a href="HNCCModel.html">HNCCModel</a>.<b>CreateNccModel</b>(<a href="HImage.html">HImage</a> <a href="#Template"><i>template</i></a>, int <a href="#NumLevels"><i>numLevels</i></a>, double <a href="#AngleStart"><i>angleStart</i></a>, double <a href="#AngleExtent"><i>angleExtent</i></a>, double <a href="#AngleStep"><i>angleStep</i></a>, string <a href="#Metric"><i>metric</i></a>)</code></p>
<p>
<code><a href="HNCCModel.html">HNCCModel</a> <a href="HImage.html">HImage</a>.<b>CreateNccModel</b>(<a href="HTuple.html">HTuple</a> <a href="#NumLevels"><i>numLevels</i></a>, double <a href="#AngleStart"><i>angleStart</i></a>, double <a href="#AngleExtent"><i>angleExtent</i></a>, <a href="HTuple.html">HTuple</a> <a href="#AngleStep"><i>angleStep</i></a>, string <a href="#Metric"><i>metric</i></a>)</code></p>
<p>
<code><a href="HNCCModel.html">HNCCModel</a> <a href="HImage.html">HImage</a>.<b>CreateNccModel</b>(int <a href="#NumLevels"><i>numLevels</i></a>, double <a href="#AngleStart"><i>angleStart</i></a>, double <a href="#AngleExtent"><i>angleExtent</i></a>, double <a href="#AngleStep"><i>angleStep</i></a>, string <a href="#Metric"><i>metric</i></a>)</code></p>
</div>
<div data-if="python" style="display:none;">
<p>
<code>def <b>create_ncc_model</b>(<a href="#Template"><i>template</i></a>: HObject, <a href="#NumLevels"><i>num_levels</i></a>: Union[int, str], <a href="#AngleStart"><i>angle_start</i></a>: float, <a href="#AngleExtent"><i>angle_extent</i></a>: float, <a href="#AngleStep"><i>angle_step</i></a>: Union[float, str], <a href="#Metric"><i>metric</i></a>: str) -&gt; HHandle</code></p>
</div>
<h2 id="sec_description">描述</h2>
<p>该算子 <code><span data-if="hdevelop" style="display:inline">create_ncc_model</span><span data-if="c" style="display:none">create_ncc_model</span><span data-if="cpp" style="display:none">CreateNccModel</span><span data-if="com" style="display:none">CreateNccModel</span><span data-if="dotnet" style="display:none">CreateNccModel</span><span data-if="python" style="display:none">create_ncc_model</span></code> prepares a template, which is
passed in the image <a href="#Template"><i><code><span data-if="hdevelop" style="display:inline">Template</span><span data-if="c" style="display:none">Template</span><span data-if="cpp" style="display:none">Template</span><span data-if="com" style="display:none">Template</span><span data-if="dotnet" style="display:none">template</span><span data-if="python" style="display:none">template</span></code></i></a>, as an NCC model used for
matching using the normalized cross correlation (NCC).  The ROI of
the model is passed as the domain of <a href="#Template"><i><code><span data-if="hdevelop" style="display:inline">Template</span><span data-if="c" style="display:none">Template</span><span data-if="cpp" style="display:none">Template</span><span data-if="com" style="display:none">Template</span><span data-if="dotnet" style="display:none">template</span><span data-if="python" style="display:none">template</span></code></i></a>.
</p>
<p>The model is generated using multiple image pyramid levels at
multiple rotations on each level and is stored in memory.  The
output parameter <a href="#ModelID"><i><code><span data-if="hdevelop" style="display:inline">ModelID</span><span data-if="c" style="display:none">ModelID</span><span data-if="cpp" style="display:none">ModelID</span><span data-if="com" style="display:none">ModelID</span><span data-if="dotnet" style="display:none">modelID</span><span data-if="python" style="display:none">model_id</span></code></i></a> is a handle for this model, which
is used in subsequent calls to <a href="find_ncc_model.html"><code><span data-if="hdevelop" style="display:inline">find_ncc_model</span><span data-if="c" style="display:none">find_ncc_model</span><span data-if="cpp" style="display:none">FindNccModel</span><span data-if="com" style="display:none">FindNccModel</span><span data-if="dotnet" style="display:none">FindNccModel</span><span data-if="python" style="display:none">find_ncc_model</span></code></a>.
</p>
<p>The number of pyramid levels is determined with the parameter
<a href="#NumLevels"><i><code><span data-if="hdevelop" style="display:inline">NumLevels</span><span data-if="c" style="display:none">NumLevels</span><span data-if="cpp" style="display:none">NumLevels</span><span data-if="com" style="display:none">NumLevels</span><span data-if="dotnet" style="display:none">numLevels</span><span data-if="python" style="display:none">num_levels</span></code></i></a>.  It should be chosen as large as possible
because by this the time necessary to find the object is
significantly reduced.  On the other hand, <a href="#NumLevels"><i><code><span data-if="hdevelop" style="display:inline">NumLevels</span><span data-if="c" style="display:none">NumLevels</span><span data-if="cpp" style="display:none">NumLevels</span><span data-if="com" style="display:none">NumLevels</span><span data-if="dotnet" style="display:none">numLevels</span><span data-if="python" style="display:none">num_levels</span></code></i></a> must
be chosen such that the model is still recognizable and contains a
sufficient number of points (at least eight) on the highest pyramid
level.  This can be checked using the domains of the output images
of <a href="gen_gauss_pyramid.html"><code><span data-if="hdevelop" style="display:inline">gen_gauss_pyramid</span><span data-if="c" style="display:none">gen_gauss_pyramid</span><span data-if="cpp" style="display:none">GenGaussPyramid</span><span data-if="com" style="display:none">GenGaussPyramid</span><span data-if="dotnet" style="display:none">GenGaussPyramid</span><span data-if="python" style="display:none">gen_gauss_pyramid</span></code></a>.  If not enough model points are
generated, the number of pyramid levels is reduced internally until
enough model points are found on the highest pyramid level.  If this
procedure would lead to a model with no pyramid levels, i.e., if the
number of model points is already too small on the lowest pyramid
level, <code><span data-if="hdevelop" style="display:inline">create_ncc_model</span><span data-if="c" style="display:none">create_ncc_model</span><span data-if="cpp" style="display:none">CreateNccModel</span><span data-if="com" style="display:none">CreateNccModel</span><span data-if="dotnet" style="display:none">CreateNccModel</span><span data-if="python" style="display:none">create_ncc_model</span></code> returns an error message.  If
<a href="#NumLevels"><i><code><span data-if="hdevelop" style="display:inline">NumLevels</span><span data-if="c" style="display:none">NumLevels</span><span data-if="cpp" style="display:none">NumLevels</span><span data-if="com" style="display:none">NumLevels</span><span data-if="dotnet" style="display:none">numLevels</span><span data-if="python" style="display:none">num_levels</span></code></i></a> is set to <i><span data-if="hdevelop" style="display:inline">'auto'</span><span data-if="c" style="display:none">"auto"</span><span data-if="cpp" style="display:none">"auto"</span><span data-if="com" style="display:none">"auto"</span><span data-if="dotnet" style="display:none">"auto"</span><span data-if="python" style="display:none">"auto"</span></i> or <i>0</i>,
<code><span data-if="hdevelop" style="display:inline">create_ncc_model</span><span data-if="c" style="display:none">create_ncc_model</span><span data-if="cpp" style="display:none">CreateNccModel</span><span data-if="com" style="display:none">CreateNccModel</span><span data-if="dotnet" style="display:none">CreateNccModel</span><span data-if="python" style="display:none">create_ncc_model</span></code> determines the number of pyramid levels
automatically.  The automatically computed number of pyramid levels
can be queried using <a href="get_ncc_model_params.html"><code><span data-if="hdevelop" style="display:inline">get_ncc_model_params</span><span data-if="c" style="display:none">get_ncc_model_params</span><span data-if="cpp" style="display:none">GetNccModelParams</span><span data-if="com" style="display:none">GetNccModelParams</span><span data-if="dotnet" style="display:none">GetNccModelParams</span><span data-if="python" style="display:none">get_ncc_model_params</span></code></a>.  In rare cases,
it might happen that <code><span data-if="hdevelop" style="display:inline">create_ncc_model</span><span data-if="c" style="display:none">create_ncc_model</span><span data-if="cpp" style="display:none">CreateNccModel</span><span data-if="com" style="display:none">CreateNccModel</span><span data-if="dotnet" style="display:none">CreateNccModel</span><span data-if="python" style="display:none">create_ncc_model</span></code> determines a value for
the number of pyramid levels that is too large or too small.  If the
number of pyramid levels is chosen too large, the model may not be
recognized in the image or it may be necessary to select very low
parameters for <code><span data-if="hdevelop" style="display:inline">MinScore</span><span data-if="c" style="display:none">MinScore</span><span data-if="cpp" style="display:none">MinScore</span><span data-if="com" style="display:none">MinScore</span><span data-if="dotnet" style="display:none">minScore</span><span data-if="python" style="display:none">min_score</span></code> in <a href="find_ncc_model.html"><code><span data-if="hdevelop" style="display:inline">find_ncc_model</span><span data-if="c" style="display:none">find_ncc_model</span><span data-if="cpp" style="display:none">FindNccModel</span><span data-if="com" style="display:none">FindNccModel</span><span data-if="dotnet" style="display:none">FindNccModel</span><span data-if="python" style="display:none">find_ncc_model</span></code></a> in order
to find the model.  If the number of pyramid levels is chosen too
small, the time required to find the model in <a href="find_ncc_model.html"><code><span data-if="hdevelop" style="display:inline">find_ncc_model</span><span data-if="c" style="display:none">find_ncc_model</span><span data-if="cpp" style="display:none">FindNccModel</span><span data-if="com" style="display:none">FindNccModel</span><span data-if="dotnet" style="display:none">FindNccModel</span><span data-if="python" style="display:none">find_ncc_model</span></code></a>
may increase.  In these cases, the number of pyramid levels should
be selected by inspecting the output of <a href="gen_gauss_pyramid.html"><code><span data-if="hdevelop" style="display:inline">gen_gauss_pyramid</span><span data-if="c" style="display:none">gen_gauss_pyramid</span><span data-if="cpp" style="display:none">GenGaussPyramid</span><span data-if="com" style="display:none">GenGaussPyramid</span><span data-if="dotnet" style="display:none">GenGaussPyramid</span><span data-if="python" style="display:none">gen_gauss_pyramid</span></code></a>.
Here, <code><span data-if="hdevelop" style="display:inline">Mode</span><span data-if="c" style="display:none">Mode</span><span data-if="cpp" style="display:none">Mode</span><span data-if="com" style="display:none">Mode</span><span data-if="dotnet" style="display:none">mode</span><span data-if="python" style="display:none">mode</span></code> = <i><span data-if="hdevelop" style="display:inline">'constant'</span><span data-if="c" style="display:none">"constant"</span><span data-if="cpp" style="display:none">"constant"</span><span data-if="com" style="display:none">"constant"</span><span data-if="dotnet" style="display:none">"constant"</span><span data-if="python" style="display:none">"constant"</span></i> and
<code><span data-if="hdevelop" style="display:inline">Scale</span><span data-if="c" style="display:none">Scale</span><span data-if="cpp" style="display:none">Scale</span><span data-if="com" style="display:none">Scale</span><span data-if="dotnet" style="display:none">scale</span><span data-if="python" style="display:none">scale</span></code> = <i>0.5</i> should be used.
</p>
<p>The parameters <a href="#AngleStart"><i><code><span data-if="hdevelop" style="display:inline">AngleStart</span><span data-if="c" style="display:none">AngleStart</span><span data-if="cpp" style="display:none">AngleStart</span><span data-if="com" style="display:none">AngleStart</span><span data-if="dotnet" style="display:none">angleStart</span><span data-if="python" style="display:none">angle_start</span></code></i></a> and <a href="#AngleExtent"><i><code><span data-if="hdevelop" style="display:inline">AngleExtent</span><span data-if="c" style="display:none">AngleExtent</span><span data-if="cpp" style="display:none">AngleExtent</span><span data-if="com" style="display:none">AngleExtent</span><span data-if="dotnet" style="display:none">angleExtent</span><span data-if="python" style="display:none">angle_extent</span></code></i></a>
determine the range of possible rotations, in which the model can
occur in the image.  Note that the model can only be found in this
range of angles by <a href="find_ncc_model.html"><code><span data-if="hdevelop" style="display:inline">find_ncc_model</span><span data-if="c" style="display:none">find_ncc_model</span><span data-if="cpp" style="display:none">FindNccModel</span><span data-if="com" style="display:none">FindNccModel</span><span data-if="dotnet" style="display:none">FindNccModel</span><span data-if="python" style="display:none">find_ncc_model</span></code></a>.  The parameter
<a href="#AngleStep"><i><code><span data-if="hdevelop" style="display:inline">AngleStep</span><span data-if="c" style="display:none">AngleStep</span><span data-if="cpp" style="display:none">AngleStep</span><span data-if="com" style="display:none">AngleStep</span><span data-if="dotnet" style="display:none">angleStep</span><span data-if="python" style="display:none">angle_step</span></code></i></a> determines the step length within the selected
range of angles.  Hence, if subpixel accuracy is not specified in
<a href="find_ncc_model.html"><code><span data-if="hdevelop" style="display:inline">find_ncc_model</span><span data-if="c" style="display:none">find_ncc_model</span><span data-if="cpp" style="display:none">FindNccModel</span><span data-if="com" style="display:none">FindNccModel</span><span data-if="dotnet" style="display:none">FindNccModel</span><span data-if="python" style="display:none">find_ncc_model</span></code></a>, this parameter specifies the accuracy that
is achievable for the angles in <a href="find_ncc_model.html"><code><span data-if="hdevelop" style="display:inline">find_ncc_model</span><span data-if="c" style="display:none">find_ncc_model</span><span data-if="cpp" style="display:none">FindNccModel</span><span data-if="com" style="display:none">FindNccModel</span><span data-if="dotnet" style="display:none">FindNccModel</span><span data-if="python" style="display:none">find_ncc_model</span></code></a>.
<a href="#AngleStep"><i><code><span data-if="hdevelop" style="display:inline">AngleStep</span><span data-if="c" style="display:none">AngleStep</span><span data-if="cpp" style="display:none">AngleStep</span><span data-if="com" style="display:none">AngleStep</span><span data-if="dotnet" style="display:none">angleStep</span><span data-if="python" style="display:none">angle_step</span></code></i></a> should be chosen based on the size of the object.
Smaller models do not possess many different discrete rotations in
the image, and hence <a href="#AngleStep"><i><code><span data-if="hdevelop" style="display:inline">AngleStep</span><span data-if="c" style="display:none">AngleStep</span><span data-if="cpp" style="display:none">AngleStep</span><span data-if="com" style="display:none">AngleStep</span><span data-if="dotnet" style="display:none">angleStep</span><span data-if="python" style="display:none">angle_step</span></code></i></a> should be chosen larger for
smaller models.  If <a href="#AngleExtent"><i><code><span data-if="hdevelop" style="display:inline">AngleExtent</span><span data-if="c" style="display:none">AngleExtent</span><span data-if="cpp" style="display:none">AngleExtent</span><span data-if="com" style="display:none">AngleExtent</span><span data-if="dotnet" style="display:none">angleExtent</span><span data-if="python" style="display:none">angle_extent</span></code></i></a> is not an integer multiple
of <a href="#AngleStep"><i><code><span data-if="hdevelop" style="display:inline">AngleStep</span><span data-if="c" style="display:none">AngleStep</span><span data-if="cpp" style="display:none">AngleStep</span><span data-if="com" style="display:none">AngleStep</span><span data-if="dotnet" style="display:none">angleStep</span><span data-if="python" style="display:none">angle_step</span></code></i></a>, <a href="#AngleStep"><i><code><span data-if="hdevelop" style="display:inline">AngleStep</span><span data-if="c" style="display:none">AngleStep</span><span data-if="cpp" style="display:none">AngleStep</span><span data-if="com" style="display:none">AngleStep</span><span data-if="dotnet" style="display:none">angleStep</span><span data-if="python" style="display:none">angle_step</span></code></i></a> is modified accordingly.
To ensure a sampling of the range of possible rotations that is
independent of the given <a href="#AngleStart"><i><code><span data-if="hdevelop" style="display:inline">AngleStart</span><span data-if="c" style="display:none">AngleStart</span><span data-if="cpp" style="display:none">AngleStart</span><span data-if="com" style="display:none">AngleStart</span><span data-if="dotnet" style="display:none">angleStart</span><span data-if="python" style="display:none">angle_start</span></code></i></a>, the range of possible
rotations is modified as follows: If there is no positive integer
value n such that <a href="#AngleStart"><i><code><span data-if="hdevelop" style="display:inline">AngleStart</span><span data-if="c" style="display:none">AngleStart</span><span data-if="cpp" style="display:none">AngleStart</span><span data-if="com" style="display:none">AngleStart</span><span data-if="dotnet" style="display:none">angleStart</span><span data-if="python" style="display:none">angle_start</span></code></i></a> plus n times
<a href="#AngleStep"><i><code><span data-if="hdevelop" style="display:inline">AngleStep</span><span data-if="c" style="display:none">AngleStep</span><span data-if="cpp" style="display:none">AngleStep</span><span data-if="com" style="display:none">AngleStep</span><span data-if="dotnet" style="display:none">angleStep</span><span data-if="python" style="display:none">angle_step</span></code></i></a> is exactly 0.0, <a href="#AngleStart"><i><code><span data-if="hdevelop" style="display:inline">AngleStart</span><span data-if="c" style="display:none">AngleStart</span><span data-if="cpp" style="display:none">AngleStart</span><span data-if="com" style="display:none">AngleStart</span><span data-if="dotnet" style="display:none">angleStart</span><span data-if="python" style="display:none">angle_start</span></code></i></a> is decreased
by up to <a href="#AngleStep"><i><code><span data-if="hdevelop" style="display:inline">AngleStep</span><span data-if="c" style="display:none">AngleStep</span><span data-if="cpp" style="display:none">AngleStep</span><span data-if="com" style="display:none">AngleStep</span><span data-if="dotnet" style="display:none">angleStep</span><span data-if="python" style="display:none">angle_step</span></code></i></a> and <a href="#AngleExtent"><i><code><span data-if="hdevelop" style="display:inline">AngleExtent</span><span data-if="c" style="display:none">AngleExtent</span><span data-if="cpp" style="display:none">AngleExtent</span><span data-if="com" style="display:none">AngleExtent</span><span data-if="dotnet" style="display:none">angleExtent</span><span data-if="python" style="display:none">angle_extent</span></code></i></a> is increased by
<a href="#AngleStep"><i><code><span data-if="hdevelop" style="display:inline">AngleStep</span><span data-if="c" style="display:none">AngleStep</span><span data-if="cpp" style="display:none">AngleStep</span><span data-if="com" style="display:none">AngleStep</span><span data-if="dotnet" style="display:none">angleStep</span><span data-if="python" style="display:none">angle_step</span></code></i></a>.
</p>
<p>The model is pre-generated for the selected angle range and stored
in memory.  The memory required to store the model is proportional
to the number of angle steps and the number of points in the model.
Hence, if <a href="#AngleStep"><i><code><span data-if="hdevelop" style="display:inline">AngleStep</span><span data-if="c" style="display:none">AngleStep</span><span data-if="cpp" style="display:none">AngleStep</span><span data-if="com" style="display:none">AngleStep</span><span data-if="dotnet" style="display:none">angleStep</span><span data-if="python" style="display:none">angle_step</span></code></i></a> is too small or <a href="#AngleExtent"><i><code><span data-if="hdevelop" style="display:inline">AngleExtent</span><span data-if="c" style="display:none">AngleExtent</span><span data-if="cpp" style="display:none">AngleExtent</span><span data-if="com" style="display:none">AngleExtent</span><span data-if="dotnet" style="display:none">angleExtent</span><span data-if="python" style="display:none">angle_extent</span></code></i></a>
too big, it may happen that the model no longer fits into the
(virtual) memory.  In this case, either <a href="#AngleStep"><i><code><span data-if="hdevelop" style="display:inline">AngleStep</span><span data-if="c" style="display:none">AngleStep</span><span data-if="cpp" style="display:none">AngleStep</span><span data-if="com" style="display:none">AngleStep</span><span data-if="dotnet" style="display:none">angleStep</span><span data-if="python" style="display:none">angle_step</span></code></i></a> must be
enlarged or <a href="#AngleExtent"><i><code><span data-if="hdevelop" style="display:inline">AngleExtent</span><span data-if="c" style="display:none">AngleExtent</span><span data-if="cpp" style="display:none">AngleExtent</span><span data-if="com" style="display:none">AngleExtent</span><span data-if="dotnet" style="display:none">angleExtent</span><span data-if="python" style="display:none">angle_extent</span></code></i></a> must be reduced.  In any case, it
is desirable that the model completely fits into the main memory,
because this avoids paging by the operating system, and hence the
time to find the object will be much smaller.  Since angles can be
determined with subpixel resolution by <a href="find_ncc_model.html"><code><span data-if="hdevelop" style="display:inline">find_ncc_model</span><span data-if="c" style="display:none">find_ncc_model</span><span data-if="cpp" style="display:none">FindNccModel</span><span data-if="com" style="display:none">FindNccModel</span><span data-if="dotnet" style="display:none">FindNccModel</span><span data-if="python" style="display:none">find_ncc_model</span></code></a>,
<a href="#AngleStep"><i><code><span data-if="hdevelop" style="display:inline">AngleStep</span><span data-if="c" style="display:none">AngleStep</span><span data-if="cpp" style="display:none">AngleStep</span><span data-if="com" style="display:none">AngleStep</span><span data-if="dotnet" style="display:none">angleStep</span><span data-if="python" style="display:none">angle_step</span></code></i></a> &gt;= 1 can be
selected for models of a diameter smaller than about 200 pixels.  If
<a href="#AngleStep"><i><code><span data-if="hdevelop" style="display:inline">AngleStep</span><span data-if="c" style="display:none">AngleStep</span><span data-if="cpp" style="display:none">AngleStep</span><span data-if="com" style="display:none">AngleStep</span><span data-if="dotnet" style="display:none">angleStep</span><span data-if="python" style="display:none">angle_step</span></code></i></a> =
<i><span data-if="hdevelop" style="display:inline">'auto'</span><span data-if="c" style="display:none">"auto"</span><span data-if="cpp" style="display:none">"auto"</span><span data-if="com" style="display:none">"auto"</span><span data-if="dotnet" style="display:none">"auto"</span><span data-if="python" style="display:none">"auto"</span></i> or <i>0</i> is selected,
<code><span data-if="hdevelop" style="display:inline">create_ncc_model</span><span data-if="c" style="display:none">create_ncc_model</span><span data-if="cpp" style="display:none">CreateNccModel</span><span data-if="com" style="display:none">CreateNccModel</span><span data-if="dotnet" style="display:none">CreateNccModel</span><span data-if="python" style="display:none">create_ncc_model</span></code> automatically determines a suitable angle
step length based on the size of the model.  The automatically
computed angle step length can be queried using
<a href="get_ncc_model_params.html"><code><span data-if="hdevelop" style="display:inline">get_ncc_model_params</span><span data-if="c" style="display:none">get_ncc_model_params</span><span data-if="cpp" style="display:none">GetNccModelParams</span><span data-if="com" style="display:none">GetNccModelParams</span><span data-if="dotnet" style="display:none">GetNccModelParams</span><span data-if="python" style="display:none">get_ncc_model_params</span></code></a>.
</p>
<p>The parameter <a href="#Metric"><i><code><span data-if="hdevelop" style="display:inline">Metric</span><span data-if="c" style="display:none">Metric</span><span data-if="cpp" style="display:none">Metric</span><span data-if="com" style="display:none">Metric</span><span data-if="dotnet" style="display:none">metric</span><span data-if="python" style="display:none">metric</span></code></i></a> determines the conditions under which
the model is recognized in the image.  If <a href="#Metric"><i><code><span data-if="hdevelop" style="display:inline">Metric</span><span data-if="c" style="display:none">Metric</span><span data-if="cpp" style="display:none">Metric</span><span data-if="com" style="display:none">Metric</span><span data-if="dotnet" style="display:none">metric</span><span data-if="python" style="display:none">metric</span></code></i></a> =
<i><span data-if="hdevelop" style="display:inline">'use_polarity'</span><span data-if="c" style="display:none">"use_polarity"</span><span data-if="cpp" style="display:none">"use_polarity"</span><span data-if="com" style="display:none">"use_polarity"</span><span data-if="dotnet" style="display:none">"use_polarity"</span><span data-if="python" style="display:none">"use_polarity"</span></i>, the object in the image and the model must
have the same contrast.  If, for example, the model is a bright
object on a dark background, the object is found only if it is also
brighter than the background.  If <a href="#Metric"><i><code><span data-if="hdevelop" style="display:inline">Metric</span><span data-if="c" style="display:none">Metric</span><span data-if="cpp" style="display:none">Metric</span><span data-if="com" style="display:none">Metric</span><span data-if="dotnet" style="display:none">metric</span><span data-if="python" style="display:none">metric</span></code></i></a> =
<i><span data-if="hdevelop" style="display:inline">'ignore_global_polarity'</span><span data-if="c" style="display:none">"ignore_global_polarity"</span><span data-if="cpp" style="display:none">"ignore_global_polarity"</span><span data-if="com" style="display:none">"ignore_global_polarity"</span><span data-if="dotnet" style="display:none">"ignore_global_polarity"</span><span data-if="python" style="display:none">"ignore_global_polarity"</span></i>, the object is found in the image
also if the contrast reverses globally.  In the above example, the
object hence is also found if it is darker than the background.  The
runtime of <a href="find_ncc_model.html"><code><span data-if="hdevelop" style="display:inline">find_ncc_model</span><span data-if="c" style="display:none">find_ncc_model</span><span data-if="cpp" style="display:none">FindNccModel</span><span data-if="com" style="display:none">FindNccModel</span><span data-if="dotnet" style="display:none">FindNccModel</span><span data-if="python" style="display:none">find_ncc_model</span></code></a> will increase slightly in this
case.
</p>
<p>The center of gravity of the domain (region) of the model image
<a href="#Template"><i><code><span data-if="hdevelop" style="display:inline">Template</span><span data-if="c" style="display:none">Template</span><span data-if="cpp" style="display:none">Template</span><span data-if="com" style="display:none">Template</span><span data-if="dotnet" style="display:none">template</span><span data-if="python" style="display:none">template</span></code></i></a> is used as the origin (reference point) of the
model.  A different origin can be set with
<a href="set_ncc_model_origin.html"><code><span data-if="hdevelop" style="display:inline">set_ncc_model_origin</span><span data-if="c" style="display:none">set_ncc_model_origin</span><span data-if="cpp" style="display:none">SetNccModelOrigin</span><span data-if="com" style="display:none">SetNccModelOrigin</span><span data-if="dotnet" style="display:none">SetNccModelOrigin</span><span data-if="python" style="display:none">set_ncc_model_origin</span></code></a>.</p>
<h2 id="sec_execution">运行信息</h2>
<ul>
  <li>多线程类型:可重入(与非独占操作符并行运行)。</li>
<li>多线程作用域:全局(可以从任何线程调用)。</li>
  <li>未经并行化处理。</li>
</ul>
<p>This operator returns a handle. Note that the state of an instance of this handle type may be changed by specific operators even though the handle is used as an input parameter by those operators.</p>
<h2 id="sec_parameters">参数表</h2>
  <div class="par">
<div class="parhead">
<span id="Template" class="parname"><b><code><span data-if="hdevelop" style="display:inline">Template</span><span data-if="c" style="display:none">Template</span><span data-if="cpp" style="display:none">Template</span><span data-if="com" style="display:none">Template</span><span data-if="dotnet" style="display:none">template</span><span data-if="python" style="display:none">template</span></code></b> (input_object)  </span><span>singlechannelimage <code>→</code> <span data-if="hdevelop" style="display:inline">object</span><span data-if="dotnet" style="display:none"><a href="HImage.html">HImage</a></span><span data-if="python" style="display:none">HObject</span><span data-if="cpp" style="display:none"><a href="HImage.html">HImage</a></span><span data-if="c" style="display:none">Hobject</span> (byte / uint2)</span>
</div>
<p class="pardesc">Input image whose domain will be used to create
the model.</p>
</div>
  <div class="par">
<div class="parhead">
<span id="NumLevels" class="parname"><b><code><span data-if="hdevelop" style="display:inline">NumLevels</span><span data-if="c" style="display:none">NumLevels</span><span data-if="cpp" style="display:none">NumLevels</span><span data-if="com" style="display:none">NumLevels</span><span data-if="dotnet" style="display:none">numLevels</span><span data-if="python" style="display:none">num_levels</span></code></b> (input_control)  </span><span>integer <code>→</code> <span data-if="dotnet" style="display:none"><a href="HTuple.html">HTuple</a></span><span data-if="python" style="display:none">Union[int, str]</span><span data-if="cpp" style="display:none"><a href="HTuple.html">HTuple</a></span><span data-if="c" style="display:none">Htuple</span><span data-if="hdevelop" style="display:inline"> (integer / </span><span data-if="hdevelop" style="display:inline">string)</span><span data-if="dotnet" style="display:none"> (<i>int</i> / </span><span data-if="dotnet" style="display:none">long / </span><span data-if="dotnet" style="display:none">string)</span><span data-if="cpp" style="display:none"> (<i>Hlong</i> / </span><span data-if="cpp" style="display:none">HString)</span><span data-if="c" style="display:none"> (<i>Hlong</i> / </span><span data-if="c" style="display:none">char*)</span></span>
</div>
<p class="pardesc">Maximum number of pyramid levels.</p>
<p class="pardesc"><span class="parcat">Default:
      </span>
    <span data-if="hdevelop" style="display:inline">'auto'</span>
    <span data-if="c" style="display:none">"auto"</span>
    <span data-if="cpp" style="display:none">"auto"</span>
    <span data-if="com" style="display:none">"auto"</span>
    <span data-if="dotnet" style="display:none">"auto"</span>
    <span data-if="python" style="display:none">"auto"</span>
</p>
<p class="pardesc"><span class="parcat">List of values:
      </span>0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, <span data-if="hdevelop" style="display:inline">'auto'</span><span data-if="c" style="display:none">"auto"</span><span data-if="cpp" style="display:none">"auto"</span><span data-if="com" style="display:none">"auto"</span><span data-if="dotnet" style="display:none">"auto"</span><span data-if="python" style="display:none">"auto"</span></p>
</div>
  <div class="par">
<div class="parhead">
<span id="AngleStart" class="parname"><b><code><span data-if="hdevelop" style="display:inline">AngleStart</span><span data-if="c" style="display:none">AngleStart</span><span data-if="cpp" style="display:none">AngleStart</span><span data-if="com" style="display:none">AngleStart</span><span data-if="dotnet" style="display:none">angleStart</span><span data-if="python" style="display:none">angle_start</span></code></b> (input_control)  </span><span>angle.rad <code>→</code> <span data-if="dotnet" style="display:none"><a href="HTuple.html">HTuple</a></span><span data-if="python" style="display:none">float</span><span data-if="cpp" style="display:none"><a href="HTuple.html">HTuple</a></span><span data-if="c" style="display:none">Htuple</span><span data-if="hdevelop" style="display:inline"> (real)</span><span data-if="dotnet" style="display:none"> (<i>double</i>)</span><span data-if="cpp" style="display:none"> (<i>double</i>)</span><span data-if="c" style="display:none"> (<i>double</i>)</span></span>
</div>
<p class="pardesc">Smallest rotation of the pattern.</p>
<p class="pardesc"><span class="parcat">Default:
      </span>-0.39</p>
<p class="pardesc"><span class="parcat">Suggested values:
      </span>-3.14, -1.57, -0.79, -0.39, -0.20, 0.0</p>
</div>
  <div class="par">
<div class="parhead">
<span id="AngleExtent" class="parname"><b><code><span data-if="hdevelop" style="display:inline">AngleExtent</span><span data-if="c" style="display:none">AngleExtent</span><span data-if="cpp" style="display:none">AngleExtent</span><span data-if="com" style="display:none">AngleExtent</span><span data-if="dotnet" style="display:none">angleExtent</span><span data-if="python" style="display:none">angle_extent</span></code></b> (input_control)  </span><span>angle.rad <code>→</code> <span data-if="dotnet" style="display:none"><a href="HTuple.html">HTuple</a></span><span data-if="python" style="display:none">float</span><span data-if="cpp" style="display:none"><a href="HTuple.html">HTuple</a></span><span data-if="c" style="display:none">Htuple</span><span data-if="hdevelop" style="display:inline"> (real)</span><span data-if="dotnet" style="display:none"> (<i>double</i>)</span><span data-if="cpp" style="display:none"> (<i>double</i>)</span><span data-if="c" style="display:none"> (<i>double</i>)</span></span>
</div>
<p class="pardesc">Extent of the rotation angles.</p>
<p class="pardesc"><span class="parcat">Default:
      </span>0.79</p>
<p class="pardesc"><span class="parcat">Suggested values:
      </span>6.29, 3.14, 1.57, 0.79, 0.39</p>
<p class="pardesc"><span class="parcat">Restriction:
      </span><code>AngleExtent &gt;= 0</code></p>
</div>
  <div class="par">
<div class="parhead">
<span id="AngleStep" class="parname"><b><code><span data-if="hdevelop" style="display:inline">AngleStep</span><span data-if="c" style="display:none">AngleStep</span><span data-if="cpp" style="display:none">AngleStep</span><span data-if="com" style="display:none">AngleStep</span><span data-if="dotnet" style="display:none">angleStep</span><span data-if="python" style="display:none">angle_step</span></code></b> (input_control)  </span><span>angle.rad <code>→</code> <span data-if="dotnet" style="display:none"><a href="HTuple.html">HTuple</a></span><span data-if="python" style="display:none">Union[float, str]</span><span data-if="cpp" style="display:none"><a href="HTuple.html">HTuple</a></span><span data-if="c" style="display:none">Htuple</span><span data-if="hdevelop" style="display:inline"> (real / </span><span data-if="hdevelop" style="display:inline">string)</span><span data-if="dotnet" style="display:none"> (<i>double</i> / </span><span data-if="dotnet" style="display:none">string)</span><span data-if="cpp" style="display:none"> (<i>double</i> / </span><span data-if="cpp" style="display:none">HString)</span><span data-if="c" style="display:none"> (<i>double</i> / </span><span data-if="c" style="display:none">char*)</span></span>
</div>
<p class="pardesc">Step length of the angles (resolution).</p>
<p class="pardesc"><span class="parcat">Default:
      </span>
    <span data-if="hdevelop" style="display:inline">'auto'</span>
    <span data-if="c" style="display:none">"auto"</span>
    <span data-if="cpp" style="display:none">"auto"</span>
    <span data-if="com" style="display:none">"auto"</span>
    <span data-if="dotnet" style="display:none">"auto"</span>
    <span data-if="python" style="display:none">"auto"</span>
</p>
<p class="pardesc"><span class="parcat">Suggested values:
      </span><span data-if="hdevelop" style="display:inline">'auto'</span><span data-if="c" style="display:none">"auto"</span><span data-if="cpp" style="display:none">"auto"</span><span data-if="com" style="display:none">"auto"</span><span data-if="dotnet" style="display:none">"auto"</span><span data-if="python" style="display:none">"auto"</span>, 0.0, 0.0175, 0.0349, 0.0524, 0.0698, 0.0873</p>
<p class="pardesc"><span class="parcat">Restriction:
      </span><code>AngleStep &gt;= 0 &amp;&amp; AngleStep &lt;= pi / 16</code></p>
</div>
  <div class="par">
<div class="parhead">
<span id="Metric" class="parname"><b><code><span data-if="hdevelop" style="display:inline">Metric</span><span data-if="c" style="display:none">Metric</span><span data-if="cpp" style="display:none">Metric</span><span data-if="com" style="display:none">Metric</span><span data-if="dotnet" style="display:none">metric</span><span data-if="python" style="display:none">metric</span></code></b> (input_control)  </span><span>string <code>→</code> <span data-if="dotnet" style="display:none"><a href="HTuple.html">HTuple</a></span><span data-if="python" style="display:none">str</span><span data-if="cpp" style="display:none"><a href="HTuple.html">HTuple</a></span><span data-if="c" style="display:none">Htuple</span><span data-if="hdevelop" style="display:inline"> (string)</span><span data-if="dotnet" style="display:none"> (<i>string</i>)</span><span data-if="cpp" style="display:none"> (<i>HString</i>)</span><span data-if="c" style="display:none"> (<i>char*</i>)</span></span>
</div>
<p class="pardesc">Match metric.</p>
<p class="pardesc"><span class="parcat">Default:
      </span>
    <span data-if="hdevelop" style="display:inline">'use_polarity'</span>
    <span data-if="c" style="display:none">"use_polarity"</span>
    <span data-if="cpp" style="display:none">"use_polarity"</span>
    <span data-if="com" style="display:none">"use_polarity"</span>
    <span data-if="dotnet" style="display:none">"use_polarity"</span>
    <span data-if="python" style="display:none">"use_polarity"</span>
</p>
<p class="pardesc"><span class="parcat">List of values:
      </span><span data-if="hdevelop" style="display:inline">'ignore_global_polarity'</span><span data-if="c" style="display:none">"ignore_global_polarity"</span><span data-if="cpp" style="display:none">"ignore_global_polarity"</span><span data-if="com" style="display:none">"ignore_global_polarity"</span><span data-if="dotnet" style="display:none">"ignore_global_polarity"</span><span data-if="python" style="display:none">"ignore_global_polarity"</span>, <span data-if="hdevelop" style="display:inline">'use_polarity'</span><span data-if="c" style="display:none">"use_polarity"</span><span data-if="cpp" style="display:none">"use_polarity"</span><span data-if="com" style="display:none">"use_polarity"</span><span data-if="dotnet" style="display:none">"use_polarity"</span><span data-if="python" style="display:none">"use_polarity"</span></p>
</div>
  <div class="par">
<div class="parhead">
<span id="ModelID" class="parname"><b><code><span data-if="hdevelop" style="display:inline">ModelID</span><span data-if="c" style="display:none">ModelID</span><span data-if="cpp" style="display:none">ModelID</span><span data-if="com" style="display:none">ModelID</span><span data-if="dotnet" style="display:none">modelID</span><span data-if="python" style="display:none">model_id</span></code></b> (output_control)  </span><span>ncc_model <code>→</code> <span data-if="dotnet" style="display:none"><a href="HNCCModel.html">HNCCModel</a>, </span><span data-if="dotnet" style="display:none"><a href="HTuple.html">HTuple</a></span><span data-if="python" style="display:none">HHandle</span><span data-if="cpp" style="display:none"><a href="HTuple.html">HTuple</a></span><span data-if="c" style="display:none">Htuple</span><span data-if="hdevelop" style="display:inline"> (handle)</span><span data-if="dotnet" style="display:none"> (<i>IntPtr</i>)</span><span data-if="cpp" style="display:none"> (<i>HHandle</i>)</span><span data-if="c" style="display:none"> (<i>handle</i>)</span></span>
</div>
<p class="pardesc">Handle of the model.</p>
</div>
<h2 id="sec_result">结果</h2>
<p>如果参数均有效，算子 <code><span data-if="hdevelop" style="display:inline">create_ncc_model</span><span data-if="c" style="display:none">create_ncc_model</span><span data-if="cpp" style="display:none">CreateNccModel</span><span data-if="com" style="display:none">CreateNccModel</span><span data-if="dotnet" style="display:none">CreateNccModel</span><span data-if="python" style="display:none">create_ncc_model</span></code>
返回值 <TT>2</TT> (
      <TT>H_MSG_TRUE</TT>)
    .  If the parameter <a href="#NumLevels"><i><code><span data-if="hdevelop" style="display:inline">NumLevels</span><span data-if="c" style="display:none">NumLevels</span><span data-if="cpp" style="display:none">NumLevels</span><span data-if="com" style="display:none">NumLevels</span><span data-if="dotnet" style="display:none">numLevels</span><span data-if="python" style="display:none">num_levels</span></code></i></a> are
chosen such that the model contains too few points, the error 8506
is raised.</p>
<h2 id="sec_predecessors">可能的前置算子</h2>
<p>
<code><a href="draw_region.html"><span data-if="hdevelop" style="display:inline">draw_region</span><span data-if="c" style="display:none">draw_region</span><span data-if="cpp" style="display:none">DrawRegion</span><span data-if="com" style="display:none">DrawRegion</span><span data-if="dotnet" style="display:none">DrawRegion</span><span data-if="python" style="display:none">draw_region</span></a></code>, 
<code><a href="reduce_domain.html"><span data-if="hdevelop" style="display:inline">reduce_domain</span><span data-if="c" style="display:none">reduce_domain</span><span data-if="cpp" style="display:none">ReduceDomain</span><span data-if="com" style="display:none">ReduceDomain</span><span data-if="dotnet" style="display:none">ReduceDomain</span><span data-if="python" style="display:none">reduce_domain</span></a></code>, 
<code><a href="threshold.html"><span data-if="hdevelop" style="display:inline">threshold</span><span data-if="c" style="display:none">threshold</span><span data-if="cpp" style="display:none">Threshold</span><span data-if="com" style="display:none">Threshold</span><span data-if="dotnet" style="display:none">Threshold</span><span data-if="python" style="display:none">threshold</span></a></code>
</p>
<h2 id="sec_successors">可能的后置算子</h2>
<p>
<code><a href="find_ncc_model.html"><span data-if="hdevelop" style="display:inline">find_ncc_model</span><span data-if="c" style="display:none">find_ncc_model</span><span data-if="cpp" style="display:none">FindNccModel</span><span data-if="com" style="display:none">FindNccModel</span><span data-if="dotnet" style="display:none">FindNccModel</span><span data-if="python" style="display:none">find_ncc_model</span></a></code>, 
<code><a href="get_ncc_model_params.html"><span data-if="hdevelop" style="display:inline">get_ncc_model_params</span><span data-if="c" style="display:none">get_ncc_model_params</span><span data-if="cpp" style="display:none">GetNccModelParams</span><span data-if="com" style="display:none">GetNccModelParams</span><span data-if="dotnet" style="display:none">GetNccModelParams</span><span data-if="python" style="display:none">get_ncc_model_params</span></a></code>, 
<code><a href="clear_ncc_model.html"><span data-if="hdevelop" style="display:inline">clear_ncc_model</span><span data-if="c" style="display:none">clear_ncc_model</span><span data-if="cpp" style="display:none">ClearNccModel</span><span data-if="com" style="display:none">ClearNccModel</span><span data-if="dotnet" style="display:none">ClearNccModel</span><span data-if="python" style="display:none">clear_ncc_model</span></a></code>, 
<code><a href="write_ncc_model.html"><span data-if="hdevelop" style="display:inline">write_ncc_model</span><span data-if="c" style="display:none">write_ncc_model</span><span data-if="cpp" style="display:none">WriteNccModel</span><span data-if="com" style="display:none">WriteNccModel</span><span data-if="dotnet" style="display:none">WriteNccModel</span><span data-if="python" style="display:none">write_ncc_model</span></a></code>, 
<code><a href="set_ncc_model_origin.html"><span data-if="hdevelop" style="display:inline">set_ncc_model_origin</span><span data-if="c" style="display:none">set_ncc_model_origin</span><span data-if="cpp" style="display:none">SetNccModelOrigin</span><span data-if="com" style="display:none">SetNccModelOrigin</span><span data-if="dotnet" style="display:none">SetNccModelOrigin</span><span data-if="python" style="display:none">set_ncc_model_origin</span></a></code>, 
<code><a href="set_ncc_model_param.html"><span data-if="hdevelop" style="display:inline">set_ncc_model_param</span><span data-if="c" style="display:none">set_ncc_model_param</span><span data-if="cpp" style="display:none">SetNccModelParam</span><span data-if="com" style="display:none">SetNccModelParam</span><span data-if="dotnet" style="display:none">SetNccModelParam</span><span data-if="python" style="display:none">set_ncc_model_param</span></a></code>, 
<code><a href="find_ncc_models.html"><span data-if="hdevelop" style="display:inline">find_ncc_models</span><span data-if="c" style="display:none">find_ncc_models</span><span data-if="cpp" style="display:none">FindNccModels</span><span data-if="com" style="display:none">FindNccModels</span><span data-if="dotnet" style="display:none">FindNccModels</span><span data-if="python" style="display:none">find_ncc_models</span></a></code>
</p>
<h2 id="sec_alternatives">可替代算子</h2>
<p>
<code><a href="create_generic_shape_model.html"><span data-if="hdevelop" style="display:inline">create_generic_shape_model</span><span data-if="c" style="display:none">create_generic_shape_model</span><span data-if="cpp" style="display:none">CreateGenericShapeModel</span><span data-if="com" style="display:none">CreateGenericShapeModel</span><span data-if="dotnet" style="display:none">CreateGenericShapeModel</span><span data-if="python" style="display:none">create_generic_shape_model</span></a></code>
</p>
<h2 id="sec_module">模块</h2>
<p>
Matching</p>
<!--OP_REF_FOOTER_START-->
<hr>
<div class="indexlink">
<a href="index_classes.html"><span data-if="dotnet" style="display:none;">类别</span><span data-if="cpp" style="display:none;">类别</span></a><span data-if="dotnet" style="display:none;"> | </span><span data-if="cpp" style="display:none;"> | </span><a href="index_by_name.html">算子列表</a>
</div>
<div class="footer">
<div class="copyright">HALCON算子参考手册 Copyright © 2015-2023 51Halcon</div>
</div>
</div>
</body>
</html>
